﻿/**
 * 
 * @file MaterialWidgetBase.h
 * @brief 材料界面基类
 * @author BaGuijun (baguijun@163.com)
 * @date 2024-05-30
 * 
 */
#ifndef MaterialWidgetBase_H_
#define MaterialWidgetBase_H_

#include "FITK_Kernel/FITKCore/FITKAbstractGUI.h"
#include "GUIPropertyDialogAPI.h"
#include "GUIWidget/GUIWidgetBase.h"

namespace EventOper {
    class ParaWidgetInterfaceOperator;
}


namespace GUI
{
    /**
     * @brief 材料界面基类
     * @author BaGuijun (baguijun@163.com)
     * @date 2024-05-30
     */
    class GUIPropertyDialogAPI MaterialWidgetBase :public GUIWidgetBase
    {
        Q_OBJECT;
    public:
        /**
         * @brief Construct a new Mat Item Widget Base object
         * @param[i]  parent         My Param doc
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-05-30
         */
        MaterialWidgetBase(EventOper::ParaWidgetInterfaceOperator* oper,QWidget* parent = nullptr);
        /**
         * @brief Destroy the Mat Item Widget Base object
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-05-30
         */
        virtual ~MaterialWidgetBase();
        /**
         * @brief 数据检查（纯虚函数）
         * @return true 成功
         * @return false 失败
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-05-30
         */
        virtual bool checkValue() = 0;
        /**
         * @brief 数据存储(在调用该函数之前必须调用checkValue)（纯虚函数）
         * @return true 成功
         * @return false 失败
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-05-30
         */
        virtual bool saveValue() = 0;

    protected:

        /**
         * @brief 操作器对象
         * @author BaGuijun (baguijun@163.com)
         * @date 2024-08-14
         */
        EventOper::ParaWidgetInterfaceOperator*  _oper = nullptr;
    };
}

#endif
